

import bpy
import nodeitems_utils
from bpy.types import Operator, Menu






class C_节点子菜单_物理(Menu):
	bl_idname = "node.menu_physics"
	bl_label = "物理"
	
	def draw(self, context):
		layout = self.layout
		#取数据
		layout.label(text='创建')
		layout.operator('node.global_node_obj_add_physics_geometry')
		layout.operator('node.global_node_obj_add_physics_material')
		layout.operator('node.global_node_obj_add_physics_body', text='创建物理体', icon='RIGID_BODY')
		#layout.menu("node.image_texture", icon='ALIGN_FLUSH')
		
		layout.operator('node.global_node_add_wheels', text='添加车轮', icon='RADIOBUT_OFF')
		layout.operator('node.global_node_add_car_rigid_body', text='添加车体', icon='AUTO')
		
		
		#编辑数据
		layout.separator()
		layout.label(text='添加')
		layout.operator('node.global_node_set_physical_body_transform')
		layout.operator('node.physics_node_add_body_to_scene', text='添加物理体到场景')
		
		layout.separator()
		layout.label(text='更新')
		layout.operator('node.global_node_physical_simulation_update', icon='FILE_REFRESH')
		
		print('context C_节点子菜单_物理 = ', context)



classes = (
	
	C_节点子菜单_物理,
	
)

def register():
	for c in classes:
		bpy.utils.register_class(c)

def unregister():
	for c in classes:
		bpy.utils.unregister_class(c)

	



